package com.cy.detectsys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 重点目标表
 * @TableName target_info
 */
@TableName(value ="target_info")
@Data
public class TargetInfo implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 目标所属
     */
    private String targetOwnership;

    /**
     * 目标中文名
     */
    private String chineseName;

    /**
     * 目标英文名
     */
    private String englishName;

    /**
     * 域名
     */
    private String domainName;

    /**
     *
     */
    private String webSite;

    /**
     * 上游组织
     */
    private String upstreamTissue;

    /**
     * 下游组织
     */
    private String downstreamTissue;

    /**
     * 简述
     */
    private String sketch;

    /**
     * 成立年份
     */
    private String year;

    /**
     * 所属国家
     */
    private String homeCountry;

    /**
     * 所在州
     */
    private String state;

    /**
     * 城市
     */
    private String city;

    /**
     * 总部详细地址
     */
    private String address;

    /**
     * 经度
     */
    private Double longitude;

    /**
     * 纬度
     */
    private Double latitude;

    @TableField(exist = false)
    private Integer total;
    /**
     * 重点行业的资产排名
     */
    @TableField(exist = false)
    private String ownershipAssets;

    /**
     * 探测结果
     */
    @TableField(exist = false)
    private Integer detectionResult;


    /**
     * 微软云重点目标资产总数量
     */
    @TableField(exist = false)
    private String assets;
    /**
     * ip
     */
    @TableField(exist = false)
    private String ip;
    /**
     * ip个数
     */
    @TableField(exist = false)
    private String ipNum;
    /**
     * 端口
     */
    @TableField(exist = false)
    private String port;
    /**
     * port个数
     */
    @TableField(exist = false)
    private String portNum;
    /**
     * 服务
     */
    @TableField(exist = false)
    private String service;
    /**
     * 服务个数
     */
    @TableField(exist = false)
    private String serviceNum;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    public Integer getId() {
        return id;
    }

    /**
     *
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 目标所属
     */
    public String getTargetOwnership() {
        return targetOwnership;
    }

    /**
     * 目标所属
     */
    public void setTargetOwnership(String targetOwnership) {
        this.targetOwnership = targetOwnership;
    }

    /**
     * 目标中文名
     */
    public String getChineseName() {
        return chineseName;
    }

    /**
     * 目标中文名
     */
    public void setChineseName(String chineseName) {
        this.chineseName = chineseName;
    }

    /**
     * 目标英文名
     */
    public String getEnglishName() {
        return englishName;
    }

    /**
     * 目标英文名
     */
    public void setEnglishName(String englishName) {
        this.englishName = englishName;
    }

    /**
     * 域名
     */
    public String getDomainName() {
        return domainName;
    }

    /**
     * 域名
     */
    public void setDomainName(String domainName) {
        this.domainName = domainName;
    }

    /**
     *
     */
    public String getWebSite() {
        return webSite;
    }

    /**
     *
     */
    public void setWebSite(String webSite) {
        this.webSite = webSite;
    }

    /**
     * 上游组织
     */
    public String getUpstreamTissue() {
        return upstreamTissue;
    }

    /**
     * 上游组织
     */
    public void setUpstreamTissue(String upstreamTissue) {
        this.upstreamTissue = upstreamTissue;
    }

    /**
     * 下游组织
     */
    public String getDownstreamTissue() {
        return downstreamTissue;
    }

    /**
     * 下游组织
     */
    public void setDownstreamTissue(String downstreamTissue) {
        this.downstreamTissue = downstreamTissue;
    }

    /**
     * 简述
     */
    public String getSketch() {
        return sketch;
    }

    /**
     * 简述
     */
    public void setSketch(String sketch) {
        this.sketch = sketch;
    }

    /**
     * 成立年份
     */
    public String getYear() {
        return year;
    }

    /**
     * 成立年份
     */
    public void setYear(String year) {
        this.year = year;
    }

    /**
     * 所属国家
     */
    public String getHomeCountry() {
        return homeCountry;
    }

    /**
     * 所属国家
     */
    public void setHomeCountry(String homeCountry) {
        this.homeCountry = homeCountry;
    }

    /**
     * 所在州
     */
    public String getState() {
        return state;
    }

    /**
     * 所在州
     */
    public void setState(String state) {
        this.state = state;
    }

    /**
     * 城市
     */
    public String getCity() {
        return city;
    }

    /**
     * 城市
     */
    public void setCity(String city) {
        this.city = city;
    }

    /**
     * 总部详细地址
     */
    public String getAddress() {
        return address;
    }

    /**
     * 总部详细地址
     */
    public void setAddress(String address) {
        this.address = address;
    }



    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TargetInfo other = (TargetInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTargetOwnership() == null ? other.getTargetOwnership() == null : this.getTargetOwnership().equals(other.getTargetOwnership()))
            && (this.getChineseName() == null ? other.getChineseName() == null : this.getChineseName().equals(other.getChineseName()))
            && (this.getEnglishName() == null ? other.getEnglishName() == null : this.getEnglishName().equals(other.getEnglishName()))
            && (this.getDomainName() == null ? other.getDomainName() == null : this.getDomainName().equals(other.getDomainName()))
            && (this.getWebSite() == null ? other.getWebSite() == null : this.getWebSite().equals(other.getWebSite()))
            && (this.getUpstreamTissue() == null ? other.getUpstreamTissue() == null : this.getUpstreamTissue().equals(other.getUpstreamTissue()))
            && (this.getDownstreamTissue() == null ? other.getDownstreamTissue() == null : this.getDownstreamTissue().equals(other.getDownstreamTissue()))
            && (this.getSketch() == null ? other.getSketch() == null : this.getSketch().equals(other.getSketch()))
            && (this.getYear() == null ? other.getYear() == null : this.getYear().equals(other.getYear()))
            && (this.getHomeCountry() == null ? other.getHomeCountry() == null : this.getHomeCountry().equals(other.getHomeCountry()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
            && (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTargetOwnership() == null) ? 0 : getTargetOwnership().hashCode());
        result = prime * result + ((getChineseName() == null) ? 0 : getChineseName().hashCode());
        result = prime * result + ((getEnglishName() == null) ? 0 : getEnglishName().hashCode());
        result = prime * result + ((getDomainName() == null) ? 0 : getDomainName().hashCode());
        result = prime * result + ((getWebSite() == null) ? 0 : getWebSite().hashCode());
        result = prime * result + ((getUpstreamTissue() == null) ? 0 : getUpstreamTissue().hashCode());
        result = prime * result + ((getDownstreamTissue() == null) ? 0 : getDownstreamTissue().hashCode());
        result = prime * result + ((getSketch() == null) ? 0 : getSketch().hashCode());
        result = prime * result + ((getYear() == null) ? 0 : getYear().hashCode());
        result = prime * result + ((getHomeCountry() == null) ? 0 : getHomeCountry().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
        result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", targetOwnership=").append(targetOwnership);
        sb.append(", chineseName=").append(chineseName);
        sb.append(", englishName=").append(englishName);
        sb.append(", domainName=").append(domainName);
        sb.append(", webSite=").append(webSite);
        sb.append(", upstreamTissue=").append(upstreamTissue);
        sb.append(", downstreamTissue=").append(downstreamTissue);
        sb.append(", sketch=").append(sketch);
        sb.append(", year=").append(year);
        sb.append(", homeCountry=").append(homeCountry);
        sb.append(", state=").append(state);
        sb.append(", city=").append(city);
        sb.append(", address=").append(address);
        sb.append(", longitude=").append(longitude);
        sb.append(", latitude=").append(latitude);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
